package com.demo.designpattern.observer;

import java.util.*;

/**
 * Created by hunter
 *
 * @Description 学生-观察者, 使用内置的接口
 */
public class DefaultStudent implements java.util.Observer {

    private String name;

    DefaultStudent(String name) {
        this.name = name;
    }

    @Override
    public void update(Observable o, Object arg) {
        System.out.println("使用内置接口的" + name + "观察到了动作");
    }
}
